rapl: raise max sane power limit from 100W to 1000W#539
Open
surban wants to merge 1 commit intointel:masterfrom
Open
rapl: raise max sane power limit from 100W to 1000W#539surban wants to merge 1 commit intointel:masterfrom
surban wants to merge 1 commit intointel:masterfrom
Conversation
The rapl_max_sane_phy_max constant (100W) is used to sanity-check the value of constraint_0_max_power_uw read from the powercap RAPL sysfs. When the reported max power exceeds this threshold, thermald falls back to dynamic mode with max_state=0, effectively preventing RAPL-based cooling from working on non-DPTF platforms. Modern desktop CPUs regularly exceed 100W max power. For example, Intel 13th/14th gen K-series processors (i9-13900K, i9-14900K) report constraint_0_max_power_uw = 125000000 (125W), which is their base power (PBP). This causes the sanity check to trip, setting max_state=0 for the rapl_controller. As a result, thermald cannot reduce PL1 to manage thermals on these systems. Raise the limit to 1000W (1000000000 uW) to accommodate current and future desktop and server processors, while still catching genuinely invalid values. Current high-end server parts (e.g. Xeon W9-3595X) already reach 350W TDP.
There was a problem hiding this comment.
Pull request overview
This PR updates thermald’s RAPL sysfs sanity threshold so modern high-power CPUs don’t get incorrectly classified as reporting an invalid constraint_0_max_power_uw, which previously forced a fallback mode that can prevent effective RAPL-based cooling on non-DPTF platforms.
Changes:
- Increase
rapl_max_sane_phy_maxfrom 100W (100,000,000 µW) to 1000W (1,000,000,000 µW). - Update the constant’s inline comment to reflect the new intended upper bound.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
rapl_max_sane_phy_maxconstant (100W / 100000000 µW) is used to sanity-checkconstraint_0_max_power_uwfrom the powercap RAPL sysfs. When the reported max power exceeds this threshold, thermald falls back to dynamic mode withmax_state=0, effectively preventing RAPL-based cooling on non-DPTF platforms.Modern desktop CPUs regularly exceed 100W max power. For example, Intel 13th/14th gen K-series processors (i9-13900K, i9-14900K) report
constraint_0_max_power_uw = 125000000(125W PBP). This causes the sanity check to trip, settingmax_state=0for therapl_controller. As a result, thermald cannot reduce PL1 to manage thermals on these systems.Observed behavior
On a Dell Precision 3660 with i9-13900K running Fedora (kernel 6.19):
MX:0for the rapl_controller cooling deviceFix
Raise the limit to 1000W (1000000000 µW) to accommodate current and future desktop and server processors while still catching genuinely invalid values. Current high-end server parts (e.g. Xeon W9-3595X) already reach 350W TDP.
Testing
Tested on Dell Precision 3660 (i9-13900K, Fedora 43, kernel 6.19.8):
rapl_controller_mmioshowsMX:0, no PL1 reduction under loadrapl_controller_mmioshowsMX:100000000, thermald successfully reduces PL1 from 200W to ~190W, holding CPU temperature around 82-87°C under full 24-core stress